package com.shop.user;

import com.shop.user.feign.trade.ITradeAtomFeignClientSvc;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


@SpringBootApplication
@EnableEurekaClient
@EnableDiscoveryClient
@EnableFeignClients
@EnableHystrix
@MapperScan("com.shop.user.atom.dao")
@RefreshScope
@RestController
public class
UserApplication {

    @Autowired
    ITradeAtomFeignClientSvc tradeAtomFeignClientSvc;

    @Value("${zlk.test}")
    String test;


    @GetMapping("/test")
    public @ResponseBody
    Integer test() {
        return tradeAtomFeignClientSvc.addPayOrder(null);
    }
    public static void main(String[] args) {
        SpringApplication.run(UserApplication.class, args);
    }
}
